package be.novelfaces.component.properties;

import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.Description;
import org.richfaces.cdk.annotations.EventName;

public interface FormEventProperties {

	@Attribute(description = @Description(value = "Script to be run when an element loses focus.", //
	displayName = "onblur"), //
	events = @EventName("blur"))
	String getOnblur();

	@Attribute(description = @Description(value = "Script to be run when an element changes.", //
	displayName = "onchange"), //
	events = { @EventName(value = "valueChange"),
			@EventName("onchange") })
	String getOnchange();

	@Attribute(description = @Description(value = "Script to be run when a context menu is triggered.", //
	displayName = "oncontextmenu"), //
	events = @EventName("contextmenu"))
	String getOncontextmenu();

	@Attribute(description = @Description(value = "Script to be run when an element gets focus.", //
	displayName = "onfocus"), //
	events = @EventName("focus"))
	String getOnfocus();

	@Attribute(description = @Description(value = "Script to be run when a form changes.", //
	displayName = "onformchange"), //
	events = @EventName("formchange"))
	String getOnformchange();

	@Attribute(description = @Description(value = "Script to be run when a form gets user input.", //
	displayName = "onforminput"), //
	events = @EventName("forminput"))
	String getOnforminput();

	@Attribute(description = @Description(value = "Script to be run when an element gets user input.", //
	displayName = "oninput"), //
	events = @EventName("input"))
	String getOninput();

	@Attribute(description = @Description(value = "Script to be run when an element is invalid.", //
	displayName = "oninvalid"), //
	events = @EventName("invalid"))
	String getOninvalid();

	@Attribute(description = @Description(value = "Script to be run when an element is selected.", //
	displayName = "onselect"), //
	events = @EventName("select"))
	String getOnselect();

	@Attribute(description = @Description(value = "Script to be run when a form is submitted.", //
	displayName = "onsubmit"), //
	events = @EventName("submit"))
	String getOnsubmit();

}
